<!DOCTYPE html>
<html>

<head>
  <title></title>
  <link href="stylesheets/base.css" rel="stylesheet">
  <link href="stylesheets/style.css" rel="stylesheet">
</head>

<body>
  <article class="blogs">
    <h2 class="title_tj">
      <p>文章<span>推荐</span></p>
    </h2>
    <div class="newblog left">

      <%for(var i=0; i < list.length; i++){%>
        <div class="oneblog">
          <h2><a title="路·过-喜欢在路上" href="/">
              <%= list[i]["chapterName"]%>
            </a></h2>
          <figure><img src=<%=list[i]["imgPath"] %> border='0' width='120' height='120' alt='路·过-喜欢在路上'></figure>
          <ul class="nlist">
            <p>
              <%= list[i]["chapterDes"]%>...
            </p>
            <a title="路·过-喜欢在路上" href=<%=list[i]["chapterUrl"] %> target="_blank" class="readmore">阅读全文>></a>
          </ul>
          <p class="dateview">
            <span>发布时间：<%= list[i]["publishTimer"]%></span>
            <span>作者：<%= list[i]["author"]%></span>
            <span>分类：[<a href="/">悠客</a>]</span>
            <span class="nl">浏览（<%= list[i]["views"]%>)</span>
            <span class="n2">评论（<a href="/">0</a>）</span>
          <div class="line"></div>
          </p>
        </div>
        <%}%>

    </div>
  </article>
  <footer>
    <p class="ft-copyright">个人博客 Sunshine </p>
    <div id="tbox"> <a id="togbook" href=""></a> <a id="gotop" href="javascript:void(0)"></a></div>
  </footer>
</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>

<script>
  // $.get("http://localhost:8084/getChapterList", function (data) {
  //   console.log('hh')
  //   console.log(data)

  // })


  // var chapterId=document.getElementById("readmore").getAttribute('href')  
  // document.getElementById('readmore').onclick=(e, chapterId)=>{
  //   e.preventDefault();
  //   console.log(chapterId);
  //   // window.location:获得当前页面的地址 (URL)，并把浏览器重定向到新的页面
  //   window.location = "http://localhost:8083/detail?chapterId=" + chapterId;
  // }
</script>


</html>